home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-29 | 992 b | 57 lines | [TEXT/PTM1] |
- /*
- Delphi AutoScan macro for ProTERM
-
- To use this macro, add the command: EXTERN(":Macros:Macro.Delphi",main());
- to the end of your Delphi logon macro, prior to the END; command.
- */
-
- INT stat;
-
- IF (WT("Mail","Hello") == 1) {
- WT("logon at");
- prompt();
-
- prompt();
- PR("GO MAIL MAIL^m");
- prompt();
- PR("DIR/NEW^M");
- prompt();
- PR("READ/NEW^M");
- WHILE(1) {
- stat = WT(1500, "MAIL> ", "No more messages");
- IF (stat == 2) { WT("MAIL> "); }
- IF (WT(100,"")) { CONTINUE; }
- IF (stat != 1) { BREAK; }
- PR("^M");
- }
- PR("EXIT^M");
- }
-
- prompt();
- PR("go comp mac forum^M");
- prompt();
- PR("dir new^M");
- prompt();
- PR("read new follow ns^M");
- prompt();
- PR("bye^M");
- WT(300);
- UI_MENU("Online:Disconnect");
- UI_CLICK("OK");
- RETURN();
-
- //
- // special function to detect a prompt
- //
- // waits for a prompt character followed by "no activity"
- // to avoid detecting the prompt within a stream of data.
- //
- FUNC prompt()
- {
- WHILE(1) {
- WT(500, "> ", ": ", "? ");
- IF (!WT(100,"")) { BREAK; }
- }
- RETURN;
- }
-